from openai import OpenAI
import gradio

client = OpenAI(api_key="<DeepSeek API Key>", base_url="https://api.deepseek.com")

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "Hello"},
    ],
    stream=False

output_text = response.choices[0].message.content)
lst_of_outs = []



import gradio as gr

def greet(name, intensity):
    lst_of_outs.append(output_text)
    return "Hello, " + name + "!" * int(intensity)

demo = gr.Interface(
    fn=greet,
    inputs=["text", "slider"],
    outputs=lst_of_outs,
)

demo.launch()